import { PAGInit } from "libpag";
import { PAG } from "libpag/types/types";

export let pag: PAG;

export function init() {
  return new Promise((resolve) => {
    PAGInit({
      locateFile(file) {
        return `https://cdn.jsdelivr.net/npm/libpag@latest/lib/${file}`;
      },
    }).then((PAG) => {
      pag = PAG;
      resolve(PAG);
    });
  });
}
